<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8"/>
        <title>0000</title>
        <style>
            body {
                height:300px;
                
            }
            .box {
                width:100px;
                height:100px;
                background:red;
                transition:2s;
            }
            body:hover .box {
                -webkit-transform:translateX(100px);  <!--沿X轴方向位移 -->
            }
        </style>
    </head>
    <body>
        <div class="box"></div>
    </body>
</html>